package com.list.wildlife.selector;

import java.io.InputStream;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.util.FileManager;
import com.list.wildlife.util.Log;

public class OntoModel {
	
	private Model model;
	private String ontoPath;
	
	public Model getModel() {
		return model;
	}

	public void setModel(Model model) {
		this.model = model;
	}

	public OntoModel(String ontoPath) {
		model = ModelFactory.createDefaultModel();
		loadOntology();
	}
	
	private void loadOntology() {
		InputStream in = FileManager.get().open(ontoPath);
		if (in == null) {
			Log.log(Log.DETAIL, "File Not Found !!!. \n");
		}else {
			model.read(in, null);
//			write(FileAddress.TRIPLE_FILE_ADDRESS);
		}
	}
}
